import bb.cascades 1.0

NavigationPane {
    id: historyNavigation
    Page {
        actions: [
            // define the actions for first tab here
            ActionItem {
                title: qsTr("Rotate")
                onTriggered: {
                    //                imgTab1.rotationZ = imgTab1.rotationZ + 90;
                }
            },
            ActionItem {
                title: qsTr("Break")
                onTriggered: {
                    //                imgTab1.imageSource = "asset:///images/picture1br.png";
                }
            }
        ]
        
        Container {
            Container {
                Label {
                    text: "aaaaaaaaaaaaaaaaaaaaaaa"
                }
            }
            
            Divider {
            }
            
            Container {
                layout: StackLayout {
                    orientation: LayoutOrientation.LeftToRight
                }
                topPadding: 50
                
                Label {
                    verticalAlignment: VerticalAlignment.Center
                    text: "bbbbb : "
                }
                
                DateTimePicker {
                    maxWidth: 600
                }
            }
            
            Container {
                layout: StackLayout {
                    orientation: LayoutOrientation.LeftToRight
                }
                topPadding: 50
                
                Label {
                    text: "bbbbb : "
                }
                
                DateTimePicker {
                    maxWidth: 600
                }
            }
            
            Container {
                layout: StackLayout {
                    orientation: LayoutOrientation.LeftToRight
                }
                topPadding: 50
                
                Label {
                    text: "bbbbb : "
                }
                
                DropDown {
                    maxWidth: 600
                    
                    selectedOption: option0
                    Option {
                        id: option0
                        text : "1 min"
                        description : "Sets the alarm to 1 minutes"
                        value : "1min"
                    
                    }
                    
                    Option {
                        text : "2 min"
                        description : "Sets the alarm to 2 minutes"
                        value : "2min"
                    
                    }
                    Option {
                        text : "3 min"
                        description : "Sets the alarm to 3 minutes"
                        value : "3min"
                    
                    }
                }
            }
            Container {
                topPadding: 50
                horizontalAlignment: HorizontalAlignment.Center
                
                Button {
                    text: "next"
                    
                    onClicked: {
                        // show detail page when the button is clicked
                        var adddetailpage = historyNavigation.getAddDetailPage();
                        console.debug("pushing detail " + adddetailpage)
                        historyNavigation.push(adddetailpage);
                    }
                }
            }
        }
    }
    
    attachedObjects: [
        ComponentDefinition {
            id: addDetailDefinition
            source: "HistoryDetail.qml"
        }
    ]
    property Page addDetailPage
    function getAddDetailPage() {
        if (! addDetailPage) {
            addDetailPage = addDetailDefinition.createObject();
        }
        return addDetailPage;
    }
}